<template>
	<view class="item">
		<view class="left">
			<image :src="icon" class="avatar">
				
			</image>
			<view class="info">
				<view class="title">
					{{title}}
				</view>
				<view class="desc">
					{{desc}}
				</view>
			</view>
		</view>
	    <view v-if="complete" class="option-s">
	    	已完成
	    </view>
		<view v-else class="option">
			{{integral}}积分
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			icon:String,
			title: String,
			desc: String,
			integral: Number,
			complete:{ type :Boolean, default: false}
		}
	}
</script>

<style scoped lang="less">
	.item{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 40upx;
		.left{
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
			
			.avatar{
				width: 72upx;
				height: 72upx;
				border-radius: 50%;
				margin-right: 30upx;
			}
			
			.info{
				.title{
					font-size: 28upx;
					color: #333333;
				}
				
				.desc{
					font-size: 26upx;
					color: #979797;
				}
			}
		}
		.option-s{
			width:160upx;
			height:56upx;
			background:#F8F8F8;
			border-radius:28upx;
			
			line-height: 56upx;
			text-align: center;
			color: #7D7D7D;
		}
		.option{
			width:160upx;
			height:56upx;
			background:rgba(233,242,254,1);
			border-radius:28upx;
			
			line-height: 56upx;
			text-align: center;
			color: #2A7DFA;
		}
		
	}
</style>
